﻿using System;
using MUnit;

namespace MUnitTests
{
    class TestCore
    {
        void ThrowException()
        {
            throw new System.Exception("Test");
        }

        [Setup]
        void Setup()
        {
            // This will be run once before each test method
        }

        [Test]
        void DecodeStackTraceString()
        {
            try
            {
                this.ThrowException();
            }
            catch (Exception e)
            {
                string message = Core.CreateErrorMessageFromStackTrace(e.StackTrace);
                Verify.Assert(message.Contains("TestCore.cs(24)"));
            }
        }

        [TearDown]
        void TearDown()
        {
            // This will be run once after each test method
        }
    }
}
